package com.ruoyi.job.service;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import java.util.Random;

/**
 * @Author: lek
 * @Description: TODO
 * @Date: 2025/3/13 17:14
 * @Version: 1.0
 */
@Service
public class BatchPaymentServiceImpl {
//    public static Log log = LogFactory.getLog(BatchPaymentServiceImpl.class);
//    @Async(value ="scorePoolTaskExecutor")
//    public    void   t() throws InterruptedException {
//        System.out.println("1");
//        Thread.sleep(10000);
//        for (int i = 0; i < 100; i++) {
//            System.out.println(i);
//        }
//        log.info("ttt");
//    }
//
//    public static Random random = new Random();
//
//
//
//
//    @Async("scorePoolTaskExecutor")
//    public void doTaskOne() throws Exception {
//        log.info("开始做任务一");
//        long start = System.currentTimeMillis();
//        Thread.sleep(random.nextInt(10000));
//        long end = System.currentTimeMillis();
//        log.info("完成任务一，耗时：" + (end - start) + "毫秒");
//    }
//
//    @Async("scorePoolTaskExecutor")
//    public void doTaskTwo() throws Exception {
//        log.info("开始做任务二");
//        long start = System.currentTimeMillis();
//        Thread.sleep(random.nextInt(10000));
//        long end = System.currentTimeMillis();
//        log.info("完成任务二，耗时：" + (end - start) + "毫秒");
//    }
//
//    @Async("scorePoolTaskExecutor")
//    public void doTaskThree() throws Exception {
//        System.out.println("开始做任务三");
//        long start = System.currentTimeMillis();
//        Thread.sleep(random.nextInt(10000));
//        long end = System.currentTimeMillis();
//        System.out.println("完成任务三，耗时：" + (end - start) + "毫秒");
//    }


}
